package com.zyh.homework.test3;

import java.util.Arrays;

/**
 * @Author zyh
 * @Date 2024/8/6 18:44
 * @Description 1.	实现字符串和字节数组之间的相互转换。比如将字符串“湖北软帝”转换为字节数组，并将字节数组再转换回字符串。
 */

public class Test3 {
    public static void main(String[] args) {
        String str="湖北软帝";
        byte[] bytes = str.getBytes();
        System.out.println(Arrays.toString(bytes));
        String s = new String(bytes);
        System.out.println("s = " + s);
    }
}
